﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Entity.PagedList<Entity.Car_Rental.LevelMsg>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="block">

        <div class="Title">
            <span class="BlueTitle">留言列表</span>
        </div>
        <table class="tableList">
            <tr>
                <th>主题
                </th>
                <th>留言日期
                </th>
            </tr>

            <%
                if (Model != null && Model.Any())
                {
                    foreach (var item in Model)
                    { %>
            <tr>
                <td>
                    <%: Html.DisplayFor(modelItem => item.Title)%>
                </td>
                <td>
                    <%: Html.DisplayFor(modelItem => item.CreateDate)%>
                </td>
            </tr>
            <% }
            }
            else
            { %>
            <tr>
                <td colspan="2">暂无留言...</td>
            </tr>
            <%} %>
            <tr>
                <td colspan="2"><%=Html.Pager(Model) %></td>
            </tr>
        </table>
    </div>
    <div class="block">

        <div class="Title">
            <span class="BlueTitle">请您留言</span>
        </div>
         <div class="content">
            <form action="/LeaveMsg/Create" method="post">
                <div class="editor-label" style="width: auto">主题:</div>
                <div class="editor-field">
                    <input type="text" name="Title" />
                </div>
                <div class="clear"></div>
                <div class="editor-label" style="width: auto">
                    详细:
                </div>
                <div class="editor-field">
                     <textarea name="Content" rows="5" cols="50"></textarea>
                </div> 
                <div class="clear"></div>
                <button class="button">提交</button>
            </form>
        </div>
    </div>
</asp:Content>
